/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.wx.entity;

import org.hibernate.validator.constraints.Length;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

import java.math.BigDecimal;

/**
 * wx_user_dis_value_recordEntity
 *
 *
 * 用于用户下单购买活动流水记录，点击获取H5参数保存该数据，回调后修改购买的状态为有效
 *
 *
 * @author wangjianxin
 * @version 2018-10-02
 */
@Table(name="wx_user_dis_value_record", alias="a", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="user_id", attrName="userId", label="user_id"),
		@Column(name="user_open_id", attrName="userOpenId", label="user_open_id"),
		@Column(name="buy_user_id", attrName="buyUserId", label="buy_user_id"),
		@Column(name="buy_user_open_id", attrName="buyUserOpenId", label="buy_user_open_id"),
		@Column(name="buy_activity_id", attrName="buyActivityId", label="buy_activity_id"),
		@Column(name="buy_price", attrName="buyPrice", label="buy_price"),
		@Column(name="dis_money_value", attrName="disMoneyValue", label="dis_money_value"),
		@Column(name="buy_flag", attrName="buyFlag", label="购买状态"),
		@Column(includeEntity=DataEntity.class),
	}, orderBy="a.update_date DESC"
)
public class WxUserDisValueRecord extends DataEntity<WxUserDisValueRecord> {
	
	private static final long serialVersionUID = 1L;
	private Long userId;		// user_id
	private String userOpenId;		// user_open_id
	private Long buyUserId;		// buy_user_id
	private String buyUserOpenId;		// buy_user_open_id
	private Long buyActivityId;		// buy_activity_id
	private BigDecimal buyPrice;		// buy_price
	private BigDecimal disMoneyValue;		// dis_money_value
	private Integer buyFlag;	//购买状态0无效，1有效

	private WxUser wxUser;
	private WxActivity wxActivity;

	private String nickName;
	private String headImg;
	private String activityTitle;
	private String activityPrice;

	private String userName;

	/**
	 * 购买的枚举字符串
	 */
	private String buyFlagContent;

	/**
	 * 添加字段手机号展示
	 */
	private String phone;

	
	public WxUserDisValueRecord() {
		this(null);
	}

	public WxUserDisValueRecord(String id){
		super(id);
	}
	
	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}
	
	@Length(min=0, max=200, message="user_open_id长度不能超过 200 个字符")
	public String getUserOpenId() {
		return userOpenId;
	}

	public void setUserOpenId(String userOpenId) {
		this.userOpenId = userOpenId;
	}
	
	public Long getBuyUserId() {
		return buyUserId;
	}

	public void setBuyUserId(Long buyUserId) {
		this.buyUserId = buyUserId;
	}
	
	@Length(min=0, max=200, message="buy_user_open_id长度不能超过 200 个字符")
	public String getBuyUserOpenId() {
		return buyUserOpenId;
	}

	public void setBuyUserOpenId(String buyUserOpenId) {
		this.buyUserOpenId = buyUserOpenId;
	}
	
	public Long getBuyActivityId() {
		return buyActivityId;
	}

	public void setBuyActivityId(Long buyActivityId) {
		this.buyActivityId = buyActivityId;
	}

	public BigDecimal getBuyPrice() {
		return buyPrice;
	}

	public void setBuyPrice(BigDecimal buyPrice) {
		this.buyPrice = buyPrice;
	}

	public BigDecimal getDisMoneyValue() {
		return disMoneyValue;
	}

	public void setDisMoneyValue(BigDecimal disMoneyValue) {
		this.disMoneyValue = disMoneyValue;
	}

	public WxUser getWxUser() {
		return wxUser;
	}

	public void setWxUser(WxUser wxUser) {
		this.wxUser = wxUser;
	}

	public WxActivity getWxActivity() {
		return wxActivity;
	}

	public void setWxActivity(WxActivity wxActivity) {
		this.wxActivity = wxActivity;
	}

	public String getNickName() {
		return nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	public String getHeadImg() {
		return headImg;
	}

	public void setHeadImg(String headImg) {
		this.headImg = headImg;
	}

	public String getActivityTitle() {
		return activityTitle;
	}

	public void setActivityTitle(String activityTitle) {
		this.activityTitle = activityTitle;
	}

	public String getActivityPrice() {
		return activityPrice;
	}

	public void setActivityPrice(String activityPrice) {
		this.activityPrice = activityPrice;
	}

	public Integer getBuyFlag() {
		return buyFlag;
	}

	public void setBuyFlag(Integer buyFlag) {
		this.buyFlag = buyFlag;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getBuyFlagContent() {
		return buyFlagContent;
	}

	public void setBuyFlagContent(String buyFlagContent) {
		this.buyFlagContent = buyFlagContent;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}
}